package com.taxi.driver.data.amap;

import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.maps.model.LatLng;
import com.amap.api.services.core.LatLonPoint;
import com.amap.api.services.geocoder.RegeocodeAddress;
import com.amap.api.services.route.DriveRouteResult;

import rx.Observable;

public interface AMapSource {

    AMapLocationClient getLocationClient();

    AMapLocation getLastLocation();

    void finishLocation();

    /**
     * 通过经纬度解析位置
     *
     * @return 位置信息
     */
    Observable<RegeocodeAddress> geocodeSearch(LatLng latLng);

    /**
     * 路线规划
     *
     * @param start 起点
     * @param end   终点
     * @return
     */
    Observable<DriveRouteResult> routeSearch(LatLonPoint start, LatLonPoint end);
}
